using System;
using System.ComponentModel;
using System.Globalization;
namespace Microsoft.Phone.Controls.Maps.Design
{
	public class ApplicationIdCredentialsProviderConverter : TypeConverter
	{
		public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
		{
			return sourceType == typeof(string);
		}
		public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
		{
			string text = value as string;
			if (text == null)
			{
				throw new NotSupportedException(ExceptionStrings.TypeConverter_InvalidApplicationIdCredentialsProvider);
			}
			return new ApplicationIdCredentialsProvider(text);
		}
	}
}
